import React,{Component} from 'react'

export default function isLogin(Com){

    return class High extends Component{

        componentWillMount(){
            
            if(localStorage.user === undefined){
                this.props.history.push('/login')
                return
            }
        }

        render(){
            return <div className="isLogin">
                <Com {...this.props}/>
            </div>
        }
    }
}

